package treesNgraphs;

import java.util.HashSet;
import java.util.Set;
import java.util.Stack;

/**
 * Created by Tzachi on 13/10/2014.
 */
public class TreeOrderScan {

    public static void preorder(TreeNode node) {
        if (node == null) {
            return;
        }
        visit(node);
        preorder(node.getLeftChild());
        preorder(node.getRightChild());
    }

    public static void visit(TreeNode node) {
        // do something
    }
}
